package com.promise.jokerdream.model.formation

import kotlinx.serialization.Serializable

/**
 * 助阵选择信息
 */
@Serializable
data class FormationSelection(
    val selectedTypeId: Int = 0,
    val selectedTypeName: String = "",
    val selectedFormationId: Int = 0,
    val selectedFormationName: String = "",
    val selectedAttrIndex: Int = 0,
    val selectedAttrName: String = ""
) {
    /**
     * 是否为空选择
     */
    val isEmpty: Boolean
        get() = selectedTypeId <= 0 || selectedFormationId <= 0 || selectedAttrIndex < 0
    
    /**
     * 是否有效选择
     */
    val isValid: Boolean
        get() = !isEmpty
    
    companion object {
        /**
         * 空选择
         */
        val EMPTY = FormationSelection()
    }
}
